Optimal. Leaf size=36 \[ -\frac {1}{a^2 d (\cos (c+d x)+1)}-\frac {\log (\cos (c+d x)+1)}{a^2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.03, antiderivative size = 36, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {3879, 43} \[ -\frac {1}{a^2 d (\cos (c+d x)+1)}-\frac {\log (\cos (c+d x)+1)}{a^2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rule 3879
Rubi steps
\begin {align*} \int \frac {\tan (c+d x)}{(a+a \sec (c+d x))^2} \, dx &=-\frac {\operatorname {Subst}\left (\int \frac {x}{(a+a x)^2} \, dx,x,\cos (c+d x)\right )}{d}\\ &=-\frac {\operatorname {Subst}\left (\int \left (-\frac {1}{a^2 (1+x)^2}+\frac {1}{a^2 (1+x)}\right ) \, dx,x,\cos (c+d x)\right )}{d}\\ &=-\frac {1}{a^2 d (1+\cos (c+d x))}-\frac {\log (1+\cos (c+d x))}{a^2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.13, size = 56, normalized size = 1.56 \[ -\frac {\sec ^2\left (\frac {1}{2} (c+d x)\right ) \left (2 \cos (c+d x) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+2 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+1\right )}{2 a^2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.48, size = 43, normalized size = 1.19 \[ -\frac {{\left (\cos \left (d x + c\right ) + 1\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 1}{a^{2} d \cos \left (d x + c\right ) + a^{2} d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.47, size = 57, normalized size = 1.58 \[ \frac {\frac {2 \, \log \left ({\left | -\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} + 1 \right |}\right )}{a^{2}} + \frac {\cos \left (d x + c\right ) - 1}{a^{2} {\left (\cos \left (d x + c\right ) + 1\right )}}}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.19, size = 50, normalized size = 1.39 \[ \frac {\ln \left (\sec \left (d x +c \right )\right )}{a^{2} d}+\frac {1}{a^{2} d \left (1+\sec \left (d x +c \right )\right )}-\frac {\ln \left (1+\sec \left (d x +c \right )\right )}{a^{2} d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.41, size = 35, normalized size = 0.97 \[ -\frac {\frac {1}{a^{2} \cos \left (d x + c\right ) + a^{2}} + \frac {\log \left (\cos \left (d x + c\right ) + 1\right )}{a^{2}}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.13, size = 35, normalized size = 0.97 \[ \frac {\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{2}}{a^2\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 19.47, size = 177, normalized size = 4.92 \[ \begin {cases} \frac {\log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )} \sec {\left (c + d x \right )}}{2 a^{2} d \sec {\left (c + d x \right )} + 2 a^{2} d} + \frac {\log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 a^{2} d \sec {\left (c + d x \right )} + 2 a^{2} d} - \frac {2 \log {\left (\sec {\left (c + d x \right )} + 1 \right )} \sec {\left (c + d x \right )}}{2 a^{2} d \sec {\left (c + d x \right )} + 2 a^{2} d} - \frac {2 \log {\left (\sec {\left (c + d x \right )} + 1 \right )}}{2 a^{2} d \sec {\left (c + d x \right )} + 2 a^{2} d} + \frac {2}{2 a^{2} d \sec {\left (c + d x \right )} + 2 a^{2} d} & \text {for}\: d \neq 0 \\\frac {x \tan {\relax (c )}}{\left (a \sec {\relax (c )} + a\right )^{2}} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________